function DialogAssigneeGui(prefix, container, item, options) {
  this._prefix = prefix;
  this._container = container;
  this._item = item;
  
  this._users = (options && options.users) ? options.users : null;
  
  this._createElements();
};

DialogAssigneeGui.prototype._createElements = function() {
  var table, tr, td, input;
  
  table = document.createElement('table');
  this._container.appendChild(table);
  
  tr = table.insertRow(-1);
  td = tr.insertCell(-1);
  td.appendChild(document.createTextNode('(none)'));
  td = tr.insertCell(-1);
  input = DOMUtils.createInput(this._prefix, this._prefix + '_none', 'radio', null, null);
  input.defaultChecked = true;
  td.appendChild(input);
    
  for (var i = 0, il = this._users.length; i < il; i++) {
    var user = this._users[i];
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.appendChild(document.createTextNode(user.account));
    td = tr.insertCell(-1);
    input = DOMUtils.createInput(this._prefix, this._prefix + '_' + i, 'radio', null, null);
    if ((this._item.product && (this._item.assignee.userId == user.id)) || (!this._item.product && (this._item.assignee && this._item.assignee.id == user.id))) {
      input.defaultChecked = true;
    }
    td.appendChild(input);
  }
  
  tr = table.insertRow(-1);
  td = tr.insertCell(-1);
  input = DOMUtils.createInput(this._prefix, this._prefix + '_save', 'button', 'Save', null);
  td.appendChild(input);
  input = DOMUtils.createInput(this._prefix, this._prefix + '_cancel', 'button', 'Cancel', null);
  td.appendChild(input);
};